<link rel="stylesheet" type="text/css" href="/css/Module_Home/new.css" />
<script type="text/javascript">
  
    
    tinyMCE.init({
        mode : "exact",
        elements : "txtMsgBody,txtMsgBody1",
        theme : "advanced",
        readonly : 1
    });
 
</script>
<div id="bodier">
    <div id="right">
        <div id="right-wrapper">
            <div id="resourcestab">
                <h3> Mails: <a href="">All(1)</a> <a href="">Shared(1)</a> <a href="">Fahmi's(1)</a></h3>
            </div>
            <div id="contenting">
                <table cellpadding="4" cellspacing="4" >
                    <tr>
                        <td rowspan="2" width="50px" valign="top">
                            <img src="<?php echo url_for('entityImage/index?entityid='.$messageSender->getId().'?>') ?>" alt="<?php echo $messageSender->getFirstname() ?>" width="50px"/>
                        </td>
                        <td id="txtMessageSender" align="left"><?php echo $messageSender->getFirstname(); ?></td>
                        <td id="txtMessageSubject" align="left">
                            <h3 id="txtMessageSubjectH3"><?php echo $message->getSubject(); ?></h3>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td id="" align="left">
                            <textarea cols="20" id="txtMsgBody" name="Reply" rows="5" style="width: auto">
                                <?php echo $message->getBody(); ?>
                            </textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <hr />
                        </td>
                    </tr>
                    <tr>
                        <td align="left" colspan="3">
                            <div id="dvMessageReply" name="dvMessageReply">
                                <table>
                                <?php foreach($message->getMessageReply() as $messageReply): ?>
                                    <tr>
                                        <td colspan="2" width="50px" valign="top"/>
                                        <td>
                                            <?php echo Entity::GetEntity($messageReply->getFromEntityId())->getFirstname() ?>
                                        </td>
                                        <td>
                                            <?php echo $messageReply->getReplybody(); ?>
                                        </td>
                                    </tr>
                                <?php endforeach ?>
                                </table>                                
                            </div>                            
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <hr />
                        </td>
                    </tr>
                    <form id="frmSendMessageReply" name="frmSendMessageReply" action="<?php echo url_for('home/sendMessageReply') ?>">
                    <tr>
                        <td>
                            <input type="hidden" id="hfMsgID" name="hfMsgID" value="<?php echo $message->getId(); ?>" />
                        </td>
                        <td>
                            <h3>Reply</h3>
                        </td>
                        <td id="" align="left" >
                            <textarea cols="20" id="txtMsgReply" name="Reply" rows="5" style="width: 100%"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td></td>
                        <td id="" align="right" >
                            <br><a href="javascript: void(0);" class="btn" onclick="document.frmSendMessageReply.submit();return true;"> Reply </a>
                        </td>
                    </tr>
                    </form>
                </table>
            </div>
        </div>
    </div>
    <div id="left">
        <div id="leftwrapper">
        <div id="adding">
            <?php include_partial('general/userProfilePicture') ?>
         </div>
          <div id="adding">
                <table  id="forapproving">
                    <tr>
                        <td> Student @ <a href="">King Abdullah University of Science and Techonology (KAUST)</a></td>
                    </tr>
                    <tr>
                        <td> Graduated (Dec 2010)  </td>
                    </tr>
                    <tr>
                        <td> Membership approved by <a href=""> Prof. Christian Voolstra</a></td>
                    </tr>
                </table>
         </div>
         <div id="adding">
                <table>
                <tr>
                    <td> <img src="/images/connections.png" width="35" height="35" alt="connections"/></td>
                    <td>Connections</td>
                </tr>
                </table>
                <table>
                    <tr>
                    <a href="">
                        <td><img src="/images/alinawaz.JPG" width="35" height="35" alt="alinawaz"/>
                        </td>
                        <td>Ali Nawaz Dars</td></a>
                    </tr>
                    <tr>
                    <a href=""><td><img src="/images/amjad.JPG" width="35" height="35" alt="amjad"/>
                        </td>
                        <td>Amjad Ali Dars</td></a>
                    </tr>
                    <a href=""><tr>
                            <td><img src="/images/rasyid.JPG" width="35" height="35" alt="rasyid"/>
                        </td>
                        <td>Rasyid Mujahid</td>
                    </tr></a>
                </table>
         </div>


         <div id="bottom">
            <a href=""> About </a>
            <a href=""> Contact </a>
            <a href=""> Help </a>
            <a href=""> Terms </a>
        </div>
            </div>
     </div>


        <?php
         // put your code here
        ?>


</div>
